{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 前期准备"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 328,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "<ipython-input-328-435ba5b2ad49>:13: DeprecationWarning: use options instead of chrome_options\n",
      "  driver = webdriver.Chrome( chrome_options = opts) #desired_capabilities=caps,\n"
     ]
    }
   ],
   "source": [
    "from selenium import webdriver\n",
    "from selenium.webdriver.common.desired_capabilities import DesiredCapabilities\n",
    "\n",
    "\n",
    "opts = webdriver.ChromeOptions()\n",
    "opts.add_argument('--no-sandbox')#解决DevToolsActivePort文件不存在的报错\n",
    "opts.add_argument('window-size=1920x3000') #指定浏览器分辨率\n",
    "opts.add_argument('--disable-gpu') #谷歌文档提到需要加上一这个属性来规避bug\n",
    "opts.add_argument('--hide-scrollbars') #隐藏滚动条, 应对些特殊页面\n",
    "out_path = r'C:\\Users\\25354\\Desktop\\女权主义'  # 是你想指定的路径\n",
    "prefs = {'profile.default_content_settings.popups': 0, 'download.default_directory': out_path}\n",
    "opts.add_experimental_option('prefs', prefs)\n",
    "driver = webdriver.Chrome( chrome_options = opts) #desired_capabilities=caps,"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 329,
   "metadata": {},
   "outputs": [],
   "source": [
    "from selenium.webdriver.support.wait import WebDriverWait\n",
    "from selenium.webdriver.support import expected_conditions as EC\n",
    "from selenium.webdriver.common.by import By\n",
    "from time import sleep\n",
    "import pandas as pd\n",
    "import requests\n",
    "import time\n",
    "import hashlib\n",
    "import base64\n",
    "import json\n",
    "import os\n",
    "from PIL import Image "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 330,
   "metadata": {},
   "outputs": [],
   "source": [
    "driver.get('https://cnki.net')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 332,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'中山大学南...'"
      ]
     },
     "execution_count": 332,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "element=driver.find_element_by_xpath('//*[@id=\"Ecp_loginShowName1\"]')\n",
    "element.get_attribute('innerHTML')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 高级检索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 333,
   "metadata": {},
   "outputs": [],
   "source": [
    "search = driver.find_element_by_xpath('//*[@id=\"highSearch\"]').click()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 检查窗口信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 334,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'CDwindow-35E715287F0A40A566E3C8BEEAAE2A07'"
      ]
     },
     "execution_count": 334,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "driver.current_window_handle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 335,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['CDwindow-35E715287F0A40A566E3C8BEEAAE2A07',\n",
       " 'CDwindow-52182425C66B871B5EBBCC46D670D968']"
      ]
     },
     "execution_count": 335,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "driver.window_handles"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 336,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "<ipython-input-336-6c6d5ce6602d>:1: DeprecationWarning: use driver.switch_to.window instead\n",
      "  driver.switch_to_window(driver.window_handles[1])\n"
     ]
    }
   ],
   "source": [
    "driver.switch_to_window(driver.window_handles[1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 专业检索\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 341,
   "metadata": {},
   "outputs": [],
   "source": [
    "点击学术期刊 = driver.find_element_by_xpath('/html/body/div[3]/div[1]/div/ul[1]/li[1]/a')\n",
    "点击学术期刊.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 342,
   "metadata": {},
   "outputs": [],
   "source": [
    "专业检索 = driver.find_element_by_xpath('//li[@name=\"majorSearch\"]')\n",
    "专业检索.get_attribute(\"textContent\")\n",
    "专业检索.click()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 输入关键词"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 343,
   "metadata": {},
   "outputs": [],
   "source": [
    "query='SU=\"女权主义\"'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 344,
   "metadata": {},
   "outputs": [],
   "source": [
    "检索 = driver.find_element_by_xpath('/html/body/div[2]/div/div[2]/div/div[1]/div[1]/div[2]/textarea')\n",
    "检索.clear()\n",
    "检索.send_keys(query)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 选择c刊和核心期刊"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 345,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('//input[@key=\"HX\"]')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 346,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('//input[@key=\"CSI\"]')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 检索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 347,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('//input[@value=\"检索\"]')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 348,
   "metadata": {},
   "outputs": [],
   "source": [
    "# element = driver.find_element_by_xpath('//div[@id=\"gridTable\"]')\n",
    "# 网页内容 = element.get_attribute('innerHTML')\n",
    "# df=pd.read_html(网页内容)[0]\n",
    "# df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 349,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'共找到<em>1,561</em>条结果'"
      ]
     },
     "execution_count": 349,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "element = driver.find_element_by_xpath('//span[@class=\"pagerTitleCell\"]')\n",
    "element.get_attribute('innerHTML')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 350,
   "metadata": {},
   "outputs": [],
   "source": [
    "element = driver.find_element_by_xpath('//*[@id=\"perPageDiv\"]/div/i')\n",
    "element.click()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 351,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 更改页面文章数量\n",
    "element = driver.find_element_by_xpath('//*[@id=\"perPageDiv\"]/ul/li[3]/a')\n",
    "element.click()\n",
    "# //*[@id=\"perPageDiv\"]/ul/li[3]/a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 352,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>篇名</th>\n",
       "      <th>作者</th>\n",
       "      <th>刊名</th>\n",
       "      <th>发表时间</th>\n",
       "      <th>被引</th>\n",
       "      <th>下载</th>\n",
       "      <th>操作</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>《你的婚礼》：悬浮的爱情与成长叙事的迷失</td>\n",
       "      <td>陈晓云</td>\n",
       "      <td>当代电影</td>\n",
       "      <td>2021-06-05</td>\n",
       "      <td>NaN</td>\n",
       "      <td>134</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>妇女解放的中国道路探索:建党初期的妇女运动</td>\n",
       "      <td>尹旦萍</td>\n",
       "      <td>中国高校社会科学</td>\n",
       "      <td>2021-05-10</td>\n",
       "      <td>NaN</td>\n",
       "      <td>42</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>论美国新黑色电影中的厌女情结</td>\n",
       "      <td>邱章红; 薛玉瑾</td>\n",
       "      <td>电影文学</td>\n",
       "      <td>2021-04-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>175</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>性别规范阴影下的新女性——玛莎·诺曼戏剧中的性别焦虑</td>\n",
       "      <td>徐瀛</td>\n",
       "      <td>四川戏剧</td>\n",
       "      <td>2021-03-25</td>\n",
       "      <td>NaN</td>\n",
       "      <td>53</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>女权主义·女性主义·“田园女权”——“Feminism”中文译名的百年演变与衍生</td>\n",
       "      <td>姚溪; 向天渊</td>\n",
       "      <td>重庆社会科学</td>\n",
       "      <td>2021-03-16</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1431</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>试析“交叉性”在美国的实践及其困境</td>\n",
       "      <td>陈筠淘; 黄奇琦</td>\n",
       "      <td>上海大学学报(社会科学版)</td>\n",
       "      <td>2021-03-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>99</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>冷酷的优生学与悲悯的心——潘光旦社会思想中的女性观</td>\n",
       "      <td>刘亚秋</td>\n",
       "      <td>妇女研究论丛</td>\n",
       "      <td>2021-03-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>146</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>异化理论视域下的女性意象——基于《资本论》的文本分析</td>\n",
       "      <td>李家懿; 项佐涛</td>\n",
       "      <td>南通大学学报(社会科学版)</td>\n",
       "      <td>2021-03-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>137</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>女权主义与女性主义的艺术阐述</td>\n",
       "      <td>何宇红</td>\n",
       "      <td>美术大观</td>\n",
       "      <td>2021-03-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>317</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>消失的年龄？——“中女”综艺的隐喻解构与建构</td>\n",
       "      <td>袁冬琪; 周宇豪; 张雨薇</td>\n",
       "      <td>河南社会科学</td>\n",
       "      <td>2021-03-01</td>\n",
       "      <td>NaN</td>\n",
       "      <td>312</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>11</td>\n",
       "      <td>反思、突转与理性回落——21世纪英语世界的女性电影理论与批评研究述评</td>\n",
       "      <td>徐丛丛</td>\n",
       "      <td>北京电影学院学报</td>\n",
       "      <td>2021-02-25</td>\n",
       "      <td>NaN</td>\n",
       "      <td>276</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>12</td>\n",
       "      <td>美国左翼女性文学的乌托邦构想——基于勒苏尔《姑娘》的探讨</td>\n",
       "      <td>张莉; 袁洋</td>\n",
       "      <td>郑州大学学报(哲学社会科学版)</td>\n",
       "      <td>2021-01-25</td>\n",
       "      <td>NaN</td>\n",
       "      <td>149</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>13</td>\n",
       "      <td>性骚扰是性别歧视吗:一个法理的追问</td>\n",
       "      <td>郭晓飞</td>\n",
       "      <td>妇女研究论丛</td>\n",
       "      <td>2021-01-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>497</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>14</td>\n",
       "      <td>女性主义话语体系的中国语境和时代价值</td>\n",
       "      <td>畅引婷; 杨霞</td>\n",
       "      <td>河南师范大学学报(哲学社会科学版)</td>\n",
       "      <td>2020-12-18 10:12</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1824</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>15</td>\n",
       "      <td>法俄中三国妇女选举权获得历史进程比较：以共享信念为中心的制度变革分析</td>\n",
       "      <td>刘庆乐</td>\n",
       "      <td>江苏社会科学</td>\n",
       "      <td>2020-11-20 16:46</td>\n",
       "      <td>NaN</td>\n",
       "      <td>180</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>16</td>\n",
       "      <td>从“帮忙看孩子”到“为共产主义培育幼苗”——山东农村保教人员研究(1951-1961)</td>\n",
       "      <td>万笑男; 朱丽丽</td>\n",
       "      <td>妇女研究论丛</td>\n",
       "      <td>2020-11-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>200</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>17</td>\n",
       "      <td>当代西方身份政治历史局限性反思</td>\n",
       "      <td>方敏; 朱韵</td>\n",
       "      <td>毛泽东邓小平理论研究</td>\n",
       "      <td>2020-10-31</td>\n",
       "      <td>NaN</td>\n",
       "      <td>230</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>18</td>\n",
       "      <td>多维景观 2019年中国女性艺术综述</td>\n",
       "      <td>曾静媛</td>\n",
       "      <td>艺术工作</td>\n",
       "      <td>2020-10-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>164</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>19</td>\n",
       "      <td>民族志知识重构与女性艺术</td>\n",
       "      <td>张晓佳</td>\n",
       "      <td>广西社会科学</td>\n",
       "      <td>2020-08-18 14:42</td>\n",
       "      <td>NaN</td>\n",
       "      <td>223</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>20</td>\n",
       "      <td>英美女性乌托邦小说评析</td>\n",
       "      <td>郭哲</td>\n",
       "      <td>社会科学战线</td>\n",
       "      <td>2020-08-01</td>\n",
       "      <td>NaN</td>\n",
       "      <td>153</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>21</td>\n",
       "      <td>性别视角下的英帝国史研究</td>\n",
       "      <td>傅新球</td>\n",
       "      <td>史学理论研究</td>\n",
       "      <td>2020-07-28</td>\n",
       "      <td>NaN</td>\n",
       "      <td>272</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>22</td>\n",
       "      <td>2019年国际新闻传播学研究的十个核心议题</td>\n",
       "      <td>赵曙光; 张竹箐</td>\n",
       "      <td>新闻记者</td>\n",
       "      <td>2020-07-20</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1596</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>23</td>\n",
       "      <td>权力关系的流动：司法实践中的二元对立困境——基于一起热点性侵案件舆论的话语分析</td>\n",
       "      <td>郭晓飞; 黄盈盈</td>\n",
       "      <td>探索与争鸣</td>\n",
       "      <td>2020-07-20</td>\n",
       "      <td>1.0</td>\n",
       "      <td>685</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>24</td>\n",
       "      <td>加拿大女权主义国际政策：成因、行为与特点</td>\n",
       "      <td>张笑一</td>\n",
       "      <td>国际论坛</td>\n",
       "      <td>2020-07-15 11:43</td>\n",
       "      <td>NaN</td>\n",
       "      <td>216</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>25</td>\n",
       "      <td>女性写作在俄国的真相——牛津大学斯拉夫学教授凯利对俄语女性文学之研究</td>\n",
       "      <td>林精华</td>\n",
       "      <td>国外社会科学</td>\n",
       "      <td>2020-07-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>148</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>26</td>\n",
       "      <td>弗吉尼亚·伍尔芙晚期反战作品的世界视野、女权思想与身份认同——以《空袭中的沉思》为中心</td>\n",
       "      <td>王莹</td>\n",
       "      <td>中国社会科学院研究生院学报</td>\n",
       "      <td>2020-07-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>115</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>27</td>\n",
       "      <td>国内关于女权社会主义研究述评</td>\n",
       "      <td>肖遥; 李海青</td>\n",
       "      <td>理论视野</td>\n",
       "      <td>2020-06-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1214</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>28</td>\n",
       "      <td>“她者”的醒来</td>\n",
       "      <td>戴潍娜</td>\n",
       "      <td>读书</td>\n",
       "      <td>2020-06-10</td>\n",
       "      <td>1.0</td>\n",
       "      <td>387</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>29</td>\n",
       "      <td>后现代女权主义广告的三重话语批判</td>\n",
       "      <td>王雪皎</td>\n",
       "      <td>包装工程</td>\n",
       "      <td>2020-05-20</td>\n",
       "      <td>NaN</td>\n",
       "      <td>425</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>30</td>\n",
       "      <td>女性的，太女性的——中国当代女性主义艺术的困境与出路</td>\n",
       "      <td>丁旭峰; 桑东辉</td>\n",
       "      <td>美术大观</td>\n",
       "      <td>2020-05-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>252</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>31</td>\n",
       "      <td>“积极同意”的是与非——关于美国性侵认定标准争议的一个综述</td>\n",
       "      <td>郭晓飞</td>\n",
       "      <td>妇女研究论丛</td>\n",
       "      <td>2020-04-21 09:20</td>\n",
       "      <td>3.0</td>\n",
       "      <td>828</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>32</td>\n",
       "      <td>资源失灵与阻抗力——基于M村婚姻暴力现象的研究</td>\n",
       "      <td>郑丹丹; 张帆</td>\n",
       "      <td>妇女研究论丛</td>\n",
       "      <td>2020-04-20 14:12</td>\n",
       "      <td>3.0</td>\n",
       "      <td>613</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>33</td>\n",
       "      <td>孟京辉《莎士比亚和狼》的后现代主义艺术</td>\n",
       "      <td>陈小妹</td>\n",
       "      <td>中国戏剧</td>\n",
       "      <td>2020-04-20</td>\n",
       "      <td>NaN</td>\n",
       "      <td>151</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>34</td>\n",
       "      <td>主体性赋权策略下的少数民族地区妇女扶贫研究——以云南省三个苗族村寨为例</td>\n",
       "      <td>钱宁; 王肖静</td>\n",
       "      <td>社会工作</td>\n",
       "      <td>2020-04-20</td>\n",
       "      <td>1.0</td>\n",
       "      <td>493</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>35</td>\n",
       "      <td>福柯与后结构主义女权主义</td>\n",
       "      <td>吴筱燕</td>\n",
       "      <td>上海文化</td>\n",
       "      <td>2020-04-20</td>\n",
       "      <td>2.0</td>\n",
       "      <td>720</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>36</td>\n",
       "      <td>“娜拉”与“海尔茂”的当代博弈——重读韦君宜小说《女人》及与妇女生活相关的文章</td>\n",
       "      <td>刘传霞</td>\n",
       "      <td>南开学报(哲学社会科学版)</td>\n",
       "      <td>2020-03-31 13:16</td>\n",
       "      <td>NaN</td>\n",
       "      <td>131</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>37</td>\n",
       "      <td>《帝国》出版20周年回顾</td>\n",
       "      <td>迈克尔·哈特; 安东尼奥·内格里; 杜云飞</td>\n",
       "      <td>马克思主义与现实</td>\n",
       "      <td>2020-03-26</td>\n",
       "      <td>1.0</td>\n",
       "      <td>85</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>38</td>\n",
       "      <td>美国“政治正确”的语义流变及其三重向度</td>\n",
       "      <td>佟德志; 樊浩</td>\n",
       "      <td>探索与争鸣</td>\n",
       "      <td>2020-03-20</td>\n",
       "      <td>2.0</td>\n",
       "      <td>822</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>39</td>\n",
       "      <td>“符号态”视域下的克里斯蒂娃女性主体观</td>\n",
       "      <td>焦宏丽; 刘成富</td>\n",
       "      <td>学海</td>\n",
       "      <td>2020-03-20</td>\n",
       "      <td>NaN</td>\n",
       "      <td>233</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>40</td>\n",
       "      <td>“做自己，还是不做自己”——奥齐克作品中的反偶像崇拜</td>\n",
       "      <td>杨卫东</td>\n",
       "      <td>外国文学动态研究</td>\n",
       "      <td>2020-03-17</td>\n",
       "      <td>NaN</td>\n",
       "      <td>193</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>41</td>\n",
       "      <td>改变之书：另一种英雄主义</td>\n",
       "      <td>戴潍娜</td>\n",
       "      <td>外国文学动态研究</td>\n",
       "      <td>2020-03-17</td>\n",
       "      <td>NaN</td>\n",
       "      <td>239</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>42</td>\n",
       "      <td>沉默规则打破者——女性主义及#MeToo运动四人谈</td>\n",
       "      <td>沈睿; 西川; 覃里雯; 戴潍娜</td>\n",
       "      <td>外国文学动态研究</td>\n",
       "      <td>2020-03-17</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1126</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>43</td>\n",
       "      <td>以两本书为标志：美国#MeToo运动两周年</td>\n",
       "      <td>沈睿</td>\n",
       "      <td>外国文学动态研究</td>\n",
       "      <td>2020-03-17</td>\n",
       "      <td>1.0</td>\n",
       "      <td>446</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>44</td>\n",
       "      <td>“妇女”的边缘与重振：改革开放以来学术反思视域中妇女解放话语的流变</td>\n",
       "      <td>陈曦</td>\n",
       "      <td>湖北社会科学</td>\n",
       "      <td>2020-03-10</td>\n",
       "      <td>1.0</td>\n",
       "      <td>281</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>45</td>\n",
       "      <td>身份自由主义的困境</td>\n",
       "      <td>马华灵</td>\n",
       "      <td>探索与争鸣</td>\n",
       "      <td>2020-03-05 15:31</td>\n",
       "      <td>NaN</td>\n",
       "      <td>594</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>46</td>\n",
       "      <td>伊斯兰女权主义:问题、方法与能动性</td>\n",
       "      <td>王宇洁; 黄婧怡</td>\n",
       "      <td>阿拉伯世界研究</td>\n",
       "      <td>2020-01-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>461</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>47</td>\n",
       "      <td>麦金农的敌人是谁？</td>\n",
       "      <td>马姝</td>\n",
       "      <td>读书</td>\n",
       "      <td>2020-01-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>196</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>48</td>\n",
       "      <td>生态乌托邦与乌托邦幻象:从《世界的词语是森林》到《阿凡达》</td>\n",
       "      <td>王茜</td>\n",
       "      <td>浙江工商大学学报</td>\n",
       "      <td>2020-01-15</td>\n",
       "      <td>NaN</td>\n",
       "      <td>326</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>49</td>\n",
       "      <td>书评:《回归舞蹈本身:表演中的身体现象学》</td>\n",
       "      <td>雷根·特鲁阿克斯; 钮晴</td>\n",
       "      <td>北京舞蹈学院学报</td>\n",
       "      <td>2019-12-31</td>\n",
       "      <td>NaN</td>\n",
       "      <td>142</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>50</td>\n",
       "      <td>《空袭中的沉思》中的战争、女权与叙事</td>\n",
       "      <td>王莹</td>\n",
       "      <td>外国文学动态研究</td>\n",
       "      <td>2019-11-17</td>\n",
       "      <td>NaN</td>\n",
       "      <td>183</td>\n",
       "      <td>下载</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Unnamed: 0                                           篇名  \\\n",
       "0            1                         《你的婚礼》：悬浮的爱情与成长叙事的迷失   \n",
       "1            2                        妇女解放的中国道路探索:建党初期的妇女运动   \n",
       "2            3                               论美国新黑色电影中的厌女情结   \n",
       "3            4                   性别规范阴影下的新女性——玛莎·诺曼戏剧中的性别焦虑   \n",
       "4            5     女权主义·女性主义·“田园女权”——“Feminism”中文译名的百年演变与衍生   \n",
       "5            6                            试析“交叉性”在美国的实践及其困境   \n",
       "6            7                    冷酷的优生学与悲悯的心——潘光旦社会思想中的女性观   \n",
       "7            8                   异化理论视域下的女性意象——基于《资本论》的文本分析   \n",
       "8            9                               女权主义与女性主义的艺术阐述   \n",
       "9           10                       消失的年龄？——“中女”综艺的隐喻解构与建构   \n",
       "10          11           反思、突转与理性回落——21世纪英语世界的女性电影理论与批评研究述评   \n",
       "11          12                 美国左翼女性文学的乌托邦构想——基于勒苏尔《姑娘》的探讨   \n",
       "12          13                            性骚扰是性别歧视吗:一个法理的追问   \n",
       "13          14                           女性主义话语体系的中国语境和时代价值   \n",
       "14          15           法俄中三国妇女选举权获得历史进程比较：以共享信念为中心的制度变革分析   \n",
       "15          16  从“帮忙看孩子”到“为共产主义培育幼苗”——山东农村保教人员研究(1951-1961)   \n",
       "16          17                              当代西方身份政治历史局限性反思   \n",
       "17          18                           多维景观 2019年中国女性艺术综述   \n",
       "18          19                                 民族志知识重构与女性艺术   \n",
       "19          20                                  英美女性乌托邦小说评析   \n",
       "20          21                                 性别视角下的英帝国史研究   \n",
       "21          22                        2019年国际新闻传播学研究的十个核心议题   \n",
       "22          23      权力关系的流动：司法实践中的二元对立困境——基于一起热点性侵案件舆论的话语分析   \n",
       "23          24                         加拿大女权主义国际政策：成因、行为与特点   \n",
       "24          25           女性写作在俄国的真相——牛津大学斯拉夫学教授凯利对俄语女性文学之研究   \n",
       "25          26  弗吉尼亚·伍尔芙晚期反战作品的世界视野、女权思想与身份认同——以《空袭中的沉思》为中心   \n",
       "26          27                               国内关于女权社会主义研究述评   \n",
       "27          28                                      “她者”的醒来   \n",
       "28          29                             后现代女权主义广告的三重话语批判   \n",
       "29          30                   女性的，太女性的——中国当代女性主义艺术的困境与出路   \n",
       "30          31                “积极同意”的是与非——关于美国性侵认定标准争议的一个综述   \n",
       "31          32                      资源失灵与阻抗力——基于M村婚姻暴力现象的研究   \n",
       "32          33                          孟京辉《莎士比亚和狼》的后现代主义艺术   \n",
       "33          34          主体性赋权策略下的少数民族地区妇女扶贫研究——以云南省三个苗族村寨为例   \n",
       "34          35                                 福柯与后结构主义女权主义   \n",
       "35          36      “娜拉”与“海尔茂”的当代博弈——重读韦君宜小说《女人》及与妇女生活相关的文章   \n",
       "36          37                                 《帝国》出版20周年回顾   \n",
       "37          38                          美国“政治正确”的语义流变及其三重向度   \n",
       "38          39                          “符号态”视域下的克里斯蒂娃女性主体观   \n",
       "39          40                   “做自己，还是不做自己”——奥齐克作品中的反偶像崇拜   \n",
       "40          41                                 改变之书：另一种英雄主义   \n",
       "41          42                    沉默规则打破者——女性主义及#MeToo运动四人谈   \n",
       "42          43                        以两本书为标志：美国#MeToo运动两周年   \n",
       "43          44            “妇女”的边缘与重振：改革开放以来学术反思视域中妇女解放话语的流变   \n",
       "44          45                                    身份自由主义的困境   \n",
       "45          46                            伊斯兰女权主义:问题、方法与能动性   \n",
       "46          47                                    麦金农的敌人是谁？   \n",
       "47          48                生态乌托邦与乌托邦幻象:从《世界的词语是森林》到《阿凡达》   \n",
       "48          49                        书评:《回归舞蹈本身:表演中的身体现象学》   \n",
       "49          50                           《空袭中的沉思》中的战争、女权与叙事   \n",
       "\n",
       "                       作者                 刊名              发表时间   被引    下载  操作  \n",
       "0                     陈晓云               当代电影        2021-06-05  NaN   134  下载  \n",
       "1                     尹旦萍           中国高校社会科学        2021-05-10  NaN    42  下载  \n",
       "2                邱章红; 薛玉瑾               电影文学        2021-04-15  NaN   175  下载  \n",
       "3                      徐瀛               四川戏剧        2021-03-25  NaN    53  下载  \n",
       "4                 姚溪; 向天渊             重庆社会科学        2021-03-16  NaN  1431  下载  \n",
       "5                陈筠淘; 黄奇琦      上海大学学报(社会科学版)        2021-03-15  NaN    99  下载  \n",
       "6                     刘亚秋             妇女研究论丛        2021-03-15  NaN   146  下载  \n",
       "7                李家懿; 项佐涛      南通大学学报(社会科学版)        2021-03-15  NaN   137  下载  \n",
       "8                     何宇红               美术大观        2021-03-15  NaN   317  下载  \n",
       "9           袁冬琪; 周宇豪; 张雨薇             河南社会科学        2021-03-01  NaN   312  下载  \n",
       "10                    徐丛丛           北京电影学院学报        2021-02-25  NaN   276  下载  \n",
       "11                 张莉; 袁洋    郑州大学学报(哲学社会科学版)        2021-01-25  NaN   149  下载  \n",
       "12                    郭晓飞             妇女研究论丛        2021-01-15  NaN   497  下载  \n",
       "13                畅引婷; 杨霞  河南师范大学学报(哲学社会科学版)  2020-12-18 10:12  2.0  1824  下载  \n",
       "14                    刘庆乐             江苏社会科学  2020-11-20 16:46  NaN   180  下载  \n",
       "15               万笑男; 朱丽丽             妇女研究论丛        2020-11-15  NaN   200  下载  \n",
       "16                 方敏; 朱韵         毛泽东邓小平理论研究        2020-10-31  NaN   230  下载  \n",
       "17                    曾静媛               艺术工作        2020-10-15  NaN   164  下载  \n",
       "18                    张晓佳             广西社会科学  2020-08-18 14:42  NaN   223  下载  \n",
       "19                     郭哲             社会科学战线        2020-08-01  NaN   153  下载  \n",
       "20                    傅新球             史学理论研究        2020-07-28  NaN   272  下载  \n",
       "21               赵曙光; 张竹箐               新闻记者        2020-07-20  1.0  1596  下载  \n",
       "22               郭晓飞; 黄盈盈              探索与争鸣        2020-07-20  1.0   685  下载  \n",
       "23                    张笑一               国际论坛  2020-07-15 11:43  NaN   216  下载  \n",
       "24                    林精华             国外社会科学        2020-07-15  NaN   148  下载  \n",
       "25                     王莹      中国社会科学院研究生院学报        2020-07-15  NaN   115  下载  \n",
       "26                肖遥; 李海青               理论视野        2020-06-15  NaN  1214  下载  \n",
       "27                    戴潍娜                 读书        2020-06-10  1.0   387  下载  \n",
       "28                    王雪皎               包装工程        2020-05-20  NaN   425  下载  \n",
       "29               丁旭峰; 桑东辉               美术大观        2020-05-15  NaN   252  下载  \n",
       "30                    郭晓飞             妇女研究论丛  2020-04-21 09:20  3.0   828  下载  \n",
       "31                郑丹丹; 张帆             妇女研究论丛  2020-04-20 14:12  3.0   613  下载  \n",
       "32                    陈小妹               中国戏剧        2020-04-20  NaN   151  下载  \n",
       "33                钱宁; 王肖静               社会工作        2020-04-20  1.0   493  下载  \n",
       "34                    吴筱燕               上海文化        2020-04-20  2.0   720  下载  \n",
       "35                    刘传霞      南开学报(哲学社会科学版)  2020-03-31 13:16  NaN   131  下载  \n",
       "36  迈克尔·哈特; 安东尼奥·内格里; 杜云飞           马克思主义与现实        2020-03-26  1.0    85  下载  \n",
       "37                佟德志; 樊浩              探索与争鸣        2020-03-20  2.0   822  下载  \n",
       "38               焦宏丽; 刘成富                 学海        2020-03-20  NaN   233  下载  \n",
       "39                    杨卫东           外国文学动态研究        2020-03-17  NaN   193  下载  \n",
       "40                    戴潍娜           外国文学动态研究        2020-03-17  NaN   239  下载  \n",
       "41       沈睿; 西川; 覃里雯; 戴潍娜           外国文学动态研究        2020-03-17  1.0  1126  下载  \n",
       "42                     沈睿           外国文学动态研究        2020-03-17  1.0   446  下载  \n",
       "43                     陈曦             湖北社会科学        2020-03-10  1.0   281  下载  \n",
       "44                    马华灵              探索与争鸣  2020-03-05 15:31  NaN   594  下载  \n",
       "45               王宇洁; 黄婧怡            阿拉伯世界研究        2020-01-15  NaN   461  下载  \n",
       "46                     马姝                 读书        2020-01-15  NaN   196  下载  \n",
       "47                     王茜           浙江工商大学学报        2020-01-15  NaN   326  下载  \n",
       "48           雷根·特鲁阿克斯; 钮晴           北京舞蹈学院学报        2019-12-31  NaN   142  下载  \n",
       "49                     王莹           外国文学动态研究        2019-11-17  NaN   183  下载  "
      ]
     },
     "execution_count": 352,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 查看页面信息\n",
    "element = driver.find_element_by_id('gridTable')\n",
    "含有页面主要数据的表格_HTML = element.get_attribute('innerHTML')\n",
    "pd.read_html(含有页面主要数据的表格_HTML)[0]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 打包(网络不好的情况下容易报错）\n",
    "* 自动识别验证码\n",
    "* 在网络不好的情况下会导致文章下载失败而报错"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 353,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "<ipython-input-353-69a93519a691>:1: DeprecationWarning: use driver.switch_to.window instead\n",
      "  driver.switch_to_window(driver.window_handles[1])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "《你的婚礼》：悬浮的爱情与成长叙事的迷失\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "<ipython-input-353-69a93519a691>:12: DeprecationWarning: use driver.switch_to.window instead\n",
      "  driver.switch_to_window(driver.window_handles[2])\n",
      "<ipython-input-353-69a93519a691>:25: DeprecationWarning: use driver.switch_to.window instead\n",
      "  driver.switch_to_window(driver.window_handles[1])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "妇女解放的中国道路探索:建党初期的妇女运动\n",
      "论美国新黑色电影中的厌女情结\n",
      "性别规范阴影下的新女性——玛莎·诺曼戏剧中的性别焦虑\n",
      "<font class=\"Mark\">女权主义</font>·女性主义·“田园女权”——“Feminism”中文译名的百年演变与衍生\n",
      "试析“交叉性”在美国的实践及其困境\n",
      "冷酷的优生学与悲悯的心——潘光旦社会思想中的女性观\n",
      "异化理论视域下的女性意象——基于《资本论》的文本分析\n",
      "<font class=\"Mark\">女权主义</font>与女性主义的艺术阐述\n",
      "消失的年龄？——“中女”综艺的隐喻解构与建构\n",
      "反思、突转与理性回落——21世纪英语世界的女性电影理论与批评研究述评\n",
      "美国左翼女性文学的乌托邦构想——基于勒苏尔《姑娘》的探讨\n",
      "性骚扰是性别歧视吗:一个法理的追问\n",
      "女性主义话语体系的中国语境和时代价值\n",
      "法俄中三国妇女选举权获得历史进程比较：以共享信念为中心的制度变革分析\n",
      "从“帮忙看孩子”到“为共产主义培育幼苗”——山东农村保教人员研究(1951-1961)\n",
      "当代西方身份政治历史局限性反思\n",
      "多维景观  2019年中国女性艺术综述\n",
      "民族志知识重构与女性艺术\n",
      "英美女性乌托邦小说评析\n",
      "性别视角下的英帝国史研究\n",
      "2019年国际新闻传播学研究的十个核心议题\n",
      "权力关系的流动：司法实践中的二元对立困境——基于一起热点性侵案件舆论的话语分析\n",
      "加拿大<font class=\"Mark\">女权主义</font>国际政策：成因、行为与特点\n",
      "女性写作在俄国的真相——牛津大学斯拉夫学教授凯利对俄语女性文学之研究\n",
      "弗吉尼亚·伍尔芙晚期反战作品的世界视野、女权思想与身份认同——以《空袭中的沉思》为中心\n",
      "国内关于女权社会主义研究述评\n",
      "“她者”的醒来\n",
      "后现代<font class=\"Mark\">女权主义</font>广告的三重话语批判\n",
      "女性的，太女性的——中国当代女性主义艺术的困境与出路\n",
      "“积极同意”的是与非——关于美国性侵认定标准争议的一个综述\n",
      "资源失灵与阻抗力——基于M村婚姻暴力现象的研究\n",
      "孟京辉《莎士比亚和狼》的后现代主义艺术\n",
      "主体性赋权策略下的少数民族地区妇女扶贫研究——以云南省三个苗族村寨为例\n",
      "福柯与后结构主义<font class=\"Mark\">女权主义</font>\n",
      "“娜拉”与“海尔茂”的当代博弈——重读韦君宜小说《女人》及与妇女生活相关的文章\n",
      "《帝国》出版20周年回顾\n",
      "美国“政治正确”的语义流变及其三重向度\n",
      "“符号态”视域下的克里斯蒂娃女性主体观\n",
      "“做自己，还是不做自己”——奥齐克作品中的反偶像崇拜\n",
      "改变之书：另一种英雄主义\n",
      "沉默规则打破者——女性主义及#MeToo运动四人谈\n",
      "以两本书为标志：美国#MeToo运动两周年\n",
      "“妇女”的边缘与重振：改革开放以来学术反思视域中妇女解放话语的流变\n",
      "身份自由主义的困境\n",
      "伊斯兰<font class=\"Mark\">女权主义</font>:问题、方法与能动性\n",
      "麦金农的敌人是谁？\n",
      "生态乌托邦与乌托邦幻象:从《世界的词语是森林》到《阿凡达》\n",
      "书评:《回归舞蹈本身:表演中的身体现象学》\n",
      "《空袭中的沉思》中的战争、女权与叙事\n",
      "政治、消费、性别：时尚场域中的意识形态角力图谱——以20世纪30年代“摩登女郎”为例的考察\n",
      "改革开放以来我国妇女解放的历程与思想发展\n",
      "<font class=\"Mark\">女权主义</font>马克思主义的新“联姻”及其可能——新世纪以来<font class=\"Mark\">女权主义</font>马克思主义的发展态势及理论评价\n",
      "朱丽叶·米切尔<font class=\"Mark\">女权主义</font>思想探析\n",
      "流水高山自有万里诗心——评《当代英美的马克思主义莎士比亚评论》\n",
      "西方<font class=\"Mark\">女权主义</font>马克思主义的女性解放观\n",
      "种族、性别与阶级——《拉格泰姆时代》中多克托罗的调和政治观\n",
      "当代美国民主社会主义的理论体系与政策主张\n",
      "身份政治与公民政治\n",
      "她到底想怎样?——评张念《性别之伤与存在之痛》\n",
      "伊斯兰世界<font class=\"Mark\">女权主义</font>理论的历史流变\n",
      "从道德主义到婚媾仪式——女性球迷对足球本体的渐进式改造\n",
      "《火车出轨》中的喜剧文化讽刺意义分析\n",
      "美术家\n",
      "超越与限制:西方女性主义教学论新探\n",
      "新文化运动与“女性主义”之诞生\n",
      "实在界的目光——哈尔·福斯特论创伤性艺术\n",
      "符号学视域下美国女性电影的表意策略\n",
      "双重身份下女性对抗性别偏见的回应行为\n",
      "性别差异与医学实践:当代人类学视角中的性别医学\n",
      "叶广芩抗战书写的新向度\n",
      "重访马克思主义经典——对西方马克思主义<font class=\"Mark\">女权主义</font>相关理论误读的反思\n",
      "宗教、性别与科学:贵格会作家韦克菲尔德及其植物学\n",
      "寻找“中间领域”:反思“MeToo”运动中的“他者化”情感政治\n",
      "2012年后“反叛女性”在流行印地语电影中的兴起\n",
      "犹太神秘主义视域下的梅勒小说《一场美国梦》解读\n",
      "共和政治与女权诉求:民初女子参政运动与精英知识女性的媒介化政治实践\n",
      "和颐酒店事件中媒体议程设置的效果分析\n",
      "近40年莎士比亚喜剧在中国的接受研究\n",
      "“世界中的美国”\n",
      "大学英语教学改革与英美文学教学初探——评《当代英美文学批评视角中的悖论诗学》\n",
      "后现代主义视阈下美国少数族裔女性文学思想解读\n",
      "广告中的女性形象呈现\n",
      "欧美影视作品对女性主义的诠释\n",
      "种族山·性别山·艺术山——论尚吉诗剧《献给黑人女孩》中的男性暴力隐喻\n",
      "<font class=\"Mark\">女权主义</font>的性论述\n",
      "浅论绘画领域的女性意识\n",
      "被记住的与被遗忘的:近代有关“七出”“三不去”的话语演变\n",
      "《水形物语》的边缘文化叙事\n",
      "现代性批判视域下的女性解放与人类解放——以“对私有财产的积极扬弃”为旨归\n",
      "1968年的美国遗产:50周年的回望\n",
      "立足问题,无关中西:在历史的内在脉络中建构的学科——对中国“妇女/性别研究”的思想史考察\n",
      "2017年韩国文坛概况\n",
      "全球视野下的美国妇女与社会性别史研究\n",
      "国际人权话语:<font class=\"Mark\">女权主义</font>的全球想象空间\n",
      "比较文学变异剖析——伍尔夫《一间自己的房间》在中国的变异\n",
      "一种新决策模型——量子决策模型\n",
      "西方性别理论变迁及其对性别定义的影响——当代性别理论的两极:两性平等与性别建构\n",
      "美国格特鲁特·斯坦因先锋戏剧思想研究\n",
      "<font class=\"Mark\">女权主义</font>的马克思主义女性解放理论问题的反思与批判\n",
      "被塑造和被书写的“第二性”——女性主义视角下的民国女性形象及其当代意义\n",
      "试谈玛丽亚·艾琳·弗尼斯《夜里如何?》一剧中的先锋性\n",
      "世界莎士比亚演出与研究的新趋向\n",
      "左右政治的失灵\n",
      "凯特·肖邦的<font class=\"Mark\">女权主义</font>文学创作探究——从《一双长丝袜》谈起\n",
      "中美影视艺术关键词(四)\n",
      "影片《神奇女侠》对女权英雄的诠释\n",
      "编后记\n",
      "寻求承认:性别权利与街头运动——对青年女权行动的实证分析\n",
      "奖学金女孩、乞女与加拿大女性主义的第二次浪潮——门罗《乞女》中的性别政治与文化谱系\n",
      "试论门罗小说的辩证女性观\n",
      "<font class=\"Mark\">女权主义</font>法学的马克思主义之维\n",
      "艾丽丝·门罗小说中开放包容的性别艺术\n",
      "从素朴的平等到马克思主义妇女观的确立——中国社会性别观的形成与变迁\n",
      "性别差异了吗?——关于女性文学研究的随想\n",
      "当代少数民族女性文学与西方女性文学的比较\n",
      "西方文论关键词:物质<font class=\"Mark\">女权主义</font>\n",
      "比较视野下当代中国女性艺术的诗性与远方——评《中国女性主义艺术性修辞学》\n",
      "20世纪初英国社会领域中的反女权运动\n",
      "中国革命影片中的男权思想与<font class=\"Mark\">女权主义</font>\n",
      "美国<font class=\"Mark\">女权主义</font>视阈下的梅根·特里的女性实验剧\n",
      "对“妇女解放”的认知——1949-1964年三份妇联刊物中底层妇女自述初探\n",
      "从《办公室》看门罗早期创作中的先锋性特征\n",
      "论“生殖异化”与“母亲神话”\n",
      "从女权视阈看美国言情小说模式的衍变\n",
      "新视角、新材料:前沿马克思主义女权理论视角下的社会主义中国研究\n",
      "框架构建、身份认同与激情政治:集体行动研究中的文化范式\n",
      "《摔跤吧!  爸爸》女性抗争主题的多重表述\n",
      "对女性标记词「女(オンナ) ～」的考察\n",
      "以色列宗教女性主义思潮及其影响\n",
      "霓虹与汤盆:让娜·迪尔曼的生活\n",
      "林语堂女性观的独特性及其现代意义\n",
      "透过《红字》看霍桑矛盾的女性观\n",
      "电影《朱诺》的“朱诺效应”与<font class=\"Mark\">女权主义</font>\n",
      "梁启超与何蕙珍“情事”新考\n",
      "热播女性叙事电视剧传播动因及特点\n",
      "社会主义的<font class=\"Mark\">女权主义</font>探究\n",
      "多丽丝·莱辛小说的后现代性解构研究\n",
      "中西方女性电影中女性形象建构对比分析\n",
      "界限的消失:活在时代的夹缝里\n",
      "电影《驴得水》女性形象解析\n",
      "晚近美国福利权的学理与实践——2006—2016年之评述\n",
      "论《傲慢与偏见》中的<font class=\"Mark\">女权主义</font>意识\n",
      "性别、<font class=\"Mark\">女权主义</font>与阶级话语\n",
      "“皇国史观”与高群逸枝的“帝国女性主义”\n",
      "建构女性权利的中国话语——评《中国<font class=\"Mark\">女权主义</font>的诞生》\n",
      "现代教育的性别僭越——对<font class=\"Mark\">女权主义</font>教育思想的批判\n",
      "萧伯纳《华伦夫人的职业》中<font class=\"Mark\">女权主义</font>思想之体现\n",
      "好莱坞连环杀手电影中的女侦探形象\n",
      "激进主义的<font class=\"Mark\">女权主义</font>评析\n",
      "性别与自我塑造:温迪·华森斯坦戏剧研究\n",
      "书写“她”的历史——非洲妇女史的兴起与发展\n",
      "劳伦斯·斯通家庭发展“三阶段理论”刍议——评《英国的家庭、性与婚姻:1500—1800》\n",
      "莫里森的生态女性主义思想解读——评《最蓝的眼睛》\n",
      "论社会性别理论视域下的女性研究及其争论\n",
      "后现代电影理论的再读写\n",
      "《侏罗纪世界》的人物形象解读\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "<ipython-input-353-69a93519a691>:28: DeprecationWarning: use driver.switch_to.window instead\n",
      "  driver.switch_to_window(driver.window_handles[-1])\n",
      "<ipython-input-353-69a93519a691>:30: DeprecationWarning: use driver.switch_to.window instead\n",
      "  driver.switch_to_window(driver.window_handles[-2])\n",
      "<ipython-input-353-69a93519a691>:32: DeprecationWarning: use driver.switch_to.window instead\n",
      "  driver.switch_to_window(driver.window_handles[-1])\n",
      "<ipython-input-41-b55e87f9bfc0>:60: DeprecationWarning: use driver.switch_to.window instead\n",
      "  driver.switch_to_window(driver.window_handles[2])\n",
      "<ipython-input-41-b55e87f9bfc0>:63: DeprecationWarning: use driver.switch_to.window instead\n",
      "  driver.switch_to_window(driver.window_handles[1])\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "加拿大文学中女性意识的多元文化烙印\n",
      "西方文学中英法女性主义文学流派的比较\n",
      "《天义》的无政府共产主义视野与何震的“女子解放”\n",
      "简·爱形象在中国的接受研究\n",
      "基于拜厄特《占有》女性思想的民族女性发展\n",
      "新女性与旧道德:晚清女学与舆论纷争——以私娼梁亚玲假冒女学生事件为视点\n",
      "中国社会男女平等吗——性别不平等的认知差异与建构\n",
      "代表理论的内涵——与汉娜·皮特金的对话\n",
      "成长的阵痛与女性意识——从《黑处有什么》看中国当代女性题材电影\n",
      "生态女性主义的源起与演进——历史与理论视角的考察\n",
      "基于社会性别视角的当代女大学生社会责任感培养\n",
      "好莱坞电影折衷主义创作研究\n",
      "当代语境下西方经典影片女性意识再审视\n",
      "穿梭于文化政治地狱的《太凯尔》(下)\n",
      "弗雷泽的<font class=\"Mark\">女权主义</font>性别正义理论建构逻辑探析\n",
      "<font class=\"Mark\">女权主义</font>视角与理论、实证、行动的三重变奏——评胡玉坤新著《社会性别与生态文明》\n",
      "从女性形象解读美国电视剧中的女性主义困境\n",
      "历史的星空:四百年来莎士比亚戏剧研究述评\n",
      "藏传佛教“众生平等”与传统<font class=\"Mark\">女权主义</font>“男女平等”之比较——以藏族《格萨尔》为例\n",
      "德拉菲尔德及其时代\n",
      "小说《小妇人》中的女性主义分析\n",
      "风险社会如何进行决策与法律沟通——由“雷洋”事件和“万科”事件谈开去\n",
      "《毒瘾难戒》中的反文化与<font class=\"Mark\">女权主义</font>问题\n",
      "《神探夏洛克》中的女性观探微\n",
      "欧美体育社会学研究中的理论运用及比较\n",
      "女性与死刑:美国经验与本土探索\n",
      "自由主义的<font class=\"Mark\">女权主义</font>探析\n",
      "如何认识性工作——国外<font class=\"Mark\">女权主义</font>和马克思主义相关论争的历史演进\n",
      "基于性别的家庭内部分工研究\n",
      "解读电影《沉睡魔咒》女性救赎观和爱情观\n",
      "荷赛女性题材获奖作品研究\n",
      "正视美国左翼文学的复杂性\n",
      "诱惑的魅力与本质主义的批判——从精神分析的视野看\n",
      "爱情幻像下的女性本质疏离——<font class=\"Mark\">女权主义</font>文学新论\n",
      "强奸罪争议问题研究——以英美普通法对强奸罪的改革为借鉴视角\n",
      "西方<font class=\"Mark\">女权主义</font>发展浪潮的逻辑梳理\n",
      "“交叉性”流派的观点、方法及其对中国性别社会学的启发\n",
      "马克思主义<font class=\"Mark\">女权主义</font>的重访——新世纪以来<font class=\"Mark\">女权主义</font>视域中的历史唯物主义\n",
      "新时期以来女性话语的生成机制探究\n",
      "女神形塑与女性规训\n",
      "从莫里森和莱辛作品解读电影的女性叙事\n",
      "从比较视角看女性主义法学的出路\n",
      "编后记\n",
      "清史研究丛书《天义·衡报》简介\n",
      "赛博<font class=\"Mark\">女权主义</font>理论和生殖技术的民族志研究\n",
      "对历史话语的性别反思\n",
      "电影表演与<font class=\"Mark\">女权主义</font>\n",
      "电影《飘》中的<font class=\"Mark\">女权主义</font>意识研究\n",
      "重新定义网络空间中的性别身体:虚拟现实电影\n",
      "20世纪美国女性戏剧发展趋势研究\n",
      "从阐释学角度看《简爱》译本中的<font class=\"Mark\">女权主义</font>\n",
      "<font class=\"Mark\">女权主义</font>文学视角下的中国旧式情爱关系批判\n",
      "门罗与契诃夫——以女性书写为中心\n",
      "西方性别理论与马克思主义理论的非零和博弈\n",
      "黛尔的独立与自由之路——重读《弗莱茨路》\n",
      "同一与差异:体育参与中的性别属性认同\n",
      "当代女性文学研究关键词及其反思\n",
      "女性主义作为理论旅行和跨国实践——以《我们的身体,我们自己》一书为例\n",
      "英国反<font class=\"Mark\">女权主义</font>探析——以英国维多利亚晚期和爱德华时期的反妇女选举权为例\n",
      "新西兰女权运动:溯源、演进与思考\n",
      "西方<font class=\"Mark\">女权主义</font>与马克思妇女理论的理论对话与现实启示\n",
      "多元阐释须以文本“自在性”为依据——张江与哈派姆关于文艺理论的对话\n",
      "女性领导力研究的差异性取向及四种认识论\n",
      "母系氏族社会系列科幻小说的符号叙述学研究\n",
      "浅析《裸者与死者》中的<font class=\"Mark\">女权主义</font>\n",
      "创业女性机会识别与创业过程管理多案例研究\n",
      "艾丽斯·沃克诗歌中的生态女人主义\n",
      "“提高觉悟”之歌:析卡特的童话《血腥密室》之改写与叙述策略\n",
      "何殷震的“女界革命”——无政府主义的妇女解放理论\n",
      "外国文学课程中性别语言差异及社会性别意识改观研究——以后现代女性主义为视角\n",
      "阿伦特<font class=\"Mark\">女权主义</font>思想辨析\n",
      "<font class=\"Mark\">女权主义</font>背景下文学作品译者主体性解读\n",
      "19世纪欧美文学中的民主意识探析\n",
      "中国女性文学理论建构的范畴与方法\n",
      "20世纪美国法学研究与法律思想概观——以最高引证率和学术代际层累为中心\n",
      "论《傲慢与偏见》作品翻译中蕴含的审美价值\n",
      "隐喻的幻像——析《可以吃的女人》与《神谕女士》中作为“抵抗话语”的饮食障碍\n",
      "浅论方方小说中的女权意识\n"
     ]
    },
    {
     "ename": "NoSuchElementException",
     "evalue": "Message: no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//*[@id=\"pdfDown\"]\"}\n  (Session info: chrome=91.0.4472.77)\n",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNoSuchElementException\u001b[0m                    Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-353-69a93519a691>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m     15\u001b[0m         \u001b[0mfiles\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mos\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mlistdir\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mpath\u001b[0m\u001b[1;33m)\u001b[0m   \u001b[1;31m# 读入文件夹\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     16\u001b[0m         \u001b[0mnum\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mfiles\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 17\u001b[1;33m         \u001b[0melement\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mdriver\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfind_element_by_xpath\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'//*[@id=\"pdfDown\"]'\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;31m#//*[@id=\"pdfDown\"]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     18\u001b[0m         \u001b[0mdriver\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mexecute_script\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"arguments[0].click();\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0melement\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     19\u001b[0m         \u001b[0msleep\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py\u001b[0m in \u001b[0;36mfind_element_by_xpath\u001b[1;34m(self, xpath)\u001b[0m\n\u001b[0;32m    392\u001b[0m             \u001b[0melement\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mdriver\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfind_element_by_xpath\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'//div/td[1]'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    393\u001b[0m         \"\"\"\n\u001b[1;32m--> 394\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfind_element\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mby\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mBy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mXPATH\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mxpath\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    395\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    396\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0mfind_elements_by_xpath\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mxpath\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py\u001b[0m in \u001b[0;36mfind_element\u001b[1;34m(self, by, value)\u001b[0m\n\u001b[0;32m    974\u001b[0m                 \u001b[0mby\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mBy\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mCSS_SELECTOR\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    975\u001b[0m                 \u001b[0mvalue\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;34m'[name=\"%s\"]'\u001b[0m \u001b[1;33m%\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 976\u001b[1;33m         return self.execute(Command.FIND_ELEMENT, {\n\u001b[0m\u001b[0;32m    977\u001b[0m             \u001b[1;34m'using'\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mby\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    978\u001b[0m             'value': value})['value']\n",
      "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py\u001b[0m in \u001b[0;36mexecute\u001b[1;34m(self, driver_command, params)\u001b[0m\n\u001b[0;32m    319\u001b[0m         \u001b[0mresponse\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcommand_executor\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mexecute\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdriver_command\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mparams\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    320\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0mresponse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 321\u001b[1;33m             \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0merror_handler\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcheck_response\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mresponse\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    322\u001b[0m             response['value'] = self._unwrap_value(\n\u001b[0;32m    323\u001b[0m                 response.get('value', None))\n",
      "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\selenium\\webdriver\\remote\\errorhandler.py\u001b[0m in \u001b[0;36mcheck_response\u001b[1;34m(self, response)\u001b[0m\n\u001b[0;32m    240\u001b[0m                 \u001b[0malert_text\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mvalue\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'alert'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'text'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    241\u001b[0m             \u001b[1;32mraise\u001b[0m \u001b[0mexception_class\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmessage\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mscreen\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstacktrace\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0malert_text\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 242\u001b[1;33m         \u001b[1;32mraise\u001b[0m \u001b[0mexception_class\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmessage\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mscreen\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstacktrace\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    243\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    244\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m_value_or_default\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mobj\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mkey\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdefault\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mNoSuchElementException\u001b[0m: Message: no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//*[@id=\"pdfDown\"]\"}\n  (Session info: chrome=91.0.4472.77)\n"
     ]
    }
   ],
   "source": [
    "driver.switch_to_window(driver.window_handles[1])\n",
    "element = driver.find_element_by_xpath('//span[@class=\"total\"]')\n",
    "max_page=int(element.get_attribute(\"textContent\").replace(\"共\",\"\").replace(\"页\",\"\"))\n",
    "for page in range(5,max_page):\n",
    "    ###点击详情页下载\n",
    "    all_当前页面的20篇文章 = driver.find_elements_by_xpath('//td[@class=\"name\"]//a')\n",
    "    sleep(5)\n",
    "    for art in range(len(all_当前页面的20篇文章)):\n",
    "        element=driver.find_elements_by_xpath('//td[@class=\"name\"]//a')[art]\n",
    "        print(element.get_attribute('innerHTML'))\n",
    "        element.click()\n",
    "        driver.switch_to_window(driver.window_handles[2])\n",
    "        sleep(5)\n",
    "        path = r\"C:\\Users\\25354\\Desktop\\女权主义\"      # 输入文件夹地址（更改为自己浏览器下载文件夹）\n",
    "        files = os.listdir(path)   # 读入文件夹\n",
    "        num = len(files) \n",
    "        element=driver.find_element_by_xpath('//*[@id=\"pdfDown\"]') #//*[@id=\"pdfDown\"]\n",
    "        driver.execute_script(\"arguments[0].click();\", element)\n",
    "        sleep(10)\n",
    "        nums= len(os.listdir(path))\n",
    "        ### 查看是否有新增下载文件出现    \n",
    "        if nums>num:\n",
    "            driver.close()\n",
    "            sleep(4)\n",
    "            driver.switch_to_window(driver.window_handles[1])\n",
    "        ### 无则进行是否有验证码页面的判定\n",
    "        else:\n",
    "            driver.switch_to_window(driver.window_handles[-1])\n",
    "            sleep(3)\n",
    "            driver.switch_to_window(driver.window_handles[-2])\n",
    "            sleep(3)\n",
    "            driver.switch_to_window(driver.window_handles[-1])\n",
    "            sleep(3)\n",
    "            try:\n",
    "                driver.find_element_by_xpath ('//*[@id=\"vImg\"]')\n",
    "                verification_code()\n",
    "            ### 没出现验证码则关闭当前窗口退回\n",
    "            except:\n",
    "                driver.close()\n",
    "                driver.switch_to_window(driver.window_handles[1])###回到链接页面\n",
    "    element=driver.find_element_by_xpath('//*[@id=\"PageNext\"]')\n",
    "    element.click()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 272,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "307.193px"
   },
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
